|
digipot10 2.2.0
|
API for configuring and manipulating DIGI POT 10 Click driver. More...
Topics | |
| DIGI POT 10 Registers List | |
| List of registers of DIGI POT 10 Click driver. | |
| DIGI POT 10 Registers Settings | |
| Settings for registers of DIGI POT 10 Click driver. | |
| DIGI POT 10 MikroBUS Map | |
| MikroBUS pin mapping of DIGI POT 10 Click driver. | |
Functions | |
| void | digipot10_cfg_setup (digipot10_cfg_t *cfg) |
| DIGI POT 10 configuration object setup function. | |
| void | digipot10_drv_interface_sel (digipot10_cfg_t *cfg, digipot10_drv_t drv_sel) |
| DIGI POT 10 driver interface setup function. | |
| err_t | digipot10_init (digipot10_t *ctx, digipot10_cfg_t *cfg) |
| DIGI POT 10 initialization function. | |
| err_t | digipot10_default_cfg (digipot10_t *ctx) |
| DIGI POT 10 default configuration function. | |
| err_t | digipot10_write_reg (digipot10_t *ctx, uint8_t reg, uint16_t data_in) |
| DIGI POT 10 write register function. | |
| err_t | digipot10_read_reg (digipot10_t *ctx, uint8_t reg, uint16_t *data_out) |
| DIGI POT 10 read register function. | |
| err_t | digipot10_increment_wiper (digipot10_t *ctx, uint8_t reg) |
| DIGI POT 10 increment wiper function. | |
| err_t | digipot10_decrement_wiper (digipot10_t *ctx, uint8_t reg) |
| DIGI POT 10 decrement wiper function. | |
| err_t | digipot10_soft_reset (digipot10_t *ctx) |
| DIGI POT 10 software reset function. | |
| err_t | digipot10_set_wiper_0 (digipot10_t *ctx, uint16_t wiper) |
| DIGI POT 10 set wiper 0 function. | |
| err_t | digipot10_set_wiper_1 (digipot10_t *ctx, uint16_t wiper) |
| DIGI POT 10 set wiper 1 function. | |
API for configuring and manipulating DIGI POT 10 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void digipot10_cfg_setup | ( | digipot10_cfg_t * | cfg | ) |
DIGI POT 10 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See digipot10_cfg_t object definition for detailed explanation. |
| err_t digipot10_decrement_wiper | ( | digipot10_t * | ctx, |
| uint8_t | reg ) |
DIGI POT 10 decrement wiper function.
This function decrements the selected wiper register value by one step.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | reg | : Wiper register address. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_default_cfg | ( | digipot10_t * | ctx | ) |
DIGI POT 10 default configuration function.
This function executes a default configuration of DIGI POT 10 Click board.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void digipot10_drv_interface_sel | ( | digipot10_cfg_t * | cfg, |
| digipot10_drv_t | drv_sel ) |
DIGI POT 10 driver interface setup function.
This function sets a serial driver interface which will be used further in the Click driver.
| [out] | cfg | : Click configuration structure. See digipot10_cfg_t object definition for detailed explanation. |
| [in] | drv_sel | : Driver interface selection. See digipot10_drv_t object definition for detailed explanation. |
| err_t digipot10_increment_wiper | ( | digipot10_t * | ctx, |
| uint8_t | reg ) |
DIGI POT 10 increment wiper function.
This function increments the selected wiper register value by one step.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | reg | : Wiper register address. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_init | ( | digipot10_t * | ctx, |
| digipot10_cfg_t * | cfg ) |
DIGI POT 10 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See digipot10_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_read_reg | ( | digipot10_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t * | data_out ) |
DIGI POT 10 read register function.
This function reads a 16-bit data word from the selected register address.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output read 16-bit data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_set_wiper_0 | ( | digipot10_t * | ctx, |
| uint16_t | wiper ) |
DIGI POT 10 set wiper 0 function.
This function sets the value of wiper 0 volatile register.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | wiper | : Wiper 0 value [0-1023]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_set_wiper_1 | ( | digipot10_t * | ctx, |
| uint16_t | wiper ) |
DIGI POT 10 set wiper 1 function.
This function sets the value of wiper 1 volatile register.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | wiper | : Wiper 1 value [0-1023]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_soft_reset | ( | digipot10_t * | ctx | ) |
DIGI POT 10 software reset function.
This function performs a software reset of the device.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t digipot10_write_reg | ( | digipot10_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t | data_in ) |
DIGI POT 10 write register function.
This function writes a 16-bit data word to the selected register address.
| [in] | ctx | : Click context object. See digipot10_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : 16-bit data to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.